﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="../../boot.js" type="text/javascript"></script>
    <style>
       html,body
       {
           height:100%;width:100%;padding:0;margin:0;
           }
    </style>
</head>
<body>
<div class="mini-fit">
    <div class="mini-datagrid" id="grid1" style="width:100%;height:100%" url="" multiSelect="true">
       <div property="columns">
          <div type="checkcolumn"></div>
          <div field="Name">名称
          </div>
       </div>
    </div>
</div>
  <div style="text-align:center;padding:10px;">               
            <mini-button onclick="onOk" style="width:60px;margin-right:20px;">确定</mini-button>       
            <mini-button onclick="onCancel" style="width:60px;">取消</mini-button>       
</div>  
</body>
</html>
<script type="text/javascript">
    mini.parse();
    var grid = mini.get("grid1");

    //我就就写死了几个数据
   
    //跨页面传入参数调用这个方法，可以控制表格加载之类的
    function SetData(data) {
        //表格可以配置url，调用load可以传递自定义参数到后台，默认参数有pageSize:10,pageIndex:0
        //grid.load({a:data.a,b:data.b})
        grid.setData(data);
    }



    function GetData() {
        var rows = grid.getSelecteds();
        return rows;
    }

    function CloseWindow(action) {
        if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
        else window.close();
    }
    function onOk(e) {
        CloseWindow("ok") 
    }
    function onCancel(e) {
        CloseWindow("cancel");
    }
</script>